/*
 * EnthalpyChangeKernel.C
 *
 *  Created on: 2017年9月11日
 *      Author: liuxiao
 */



#include "EnthalpyChangeKernel.h"
registerMooseObject("TrilobitaApp", EnthalpyChangeKernel);
template<>
InputParameters validParams<EnthalpyChangeKernel>()
{
  InputParameters params = validParams<Kernel>();
  params.addClassDescription("Compute heat source kernel ");
  return params;
}

EnthalpyChangeKernel::EnthalpyChangeKernel(const InputParameters & parameters) :
  Kernel(parameters),
  _drhos_dt(getMaterialProperty<Real>("drhos_dt")),
  _hs(getMaterialProperty<Real>("hs")),
  _hg(getMaterialProperty<Real>("hg")),
  _porosity(getMaterialProperty<Real>("porosity"))
{

}

Real EnthalpyChangeKernel::computeQpResidual()
{
//	std::cout << _k[_qp] <<std::endl;
  Real r(0);
  r = _drhos_dt[_qp]*(_hs[_qp]-_hg[_qp]) * _test[_i][_qp];
//  std::cout<<r<<std::endl;
  return r;
}

Real EnthalpyChangeKernel::computeQpJacobian()
{
  Real jac(0);
//  jac = _ks[_qp]*_grad_phi[_j][_qp] * _grad_test[_i][_qp];
  return jac;
}








